﻿@model List<GameSchool.Models.ViewModels.NewsItemViewModel>


        
                    <h2>@ViewBag.Message</h2>
                    @foreach (var m in Model)
                    {    <section class="newsItem three-quarters">
                            <section class="three-quarters">
                                <h5>@m.Title</h5>
                                </section>
                                <section class="one-quarters last">
                            <h4>@m.Course</h4>
                            <h6 id="date">@m.date</h6>
                            </section>
                            
                            <section class="newsText">
                            <p>@m.Body</p>
                            </section>
                            
                            <h6>@m.Author
                            @if(User.IsInRole("Admin")){
                                   <h7> @Html.ActionLink("Eyða frétt", "Delete/" + @m.ID, "News")   -    @Html.ActionLink("Breyta frétt", "Edit/" + @m.ID, "News")</h7>

                            }</h6>
                            </section>
                    }
                                        
                          
    @section FooterScript
    {
        @if(!User.IsInRole("admin"))
        {
            <script type="text/javascript">
                $(document).ready(function () {

                    GetMainPoints();

                });
            </script>     
        }
    }    
